<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了添加数据调用。</div>
</div>
</div>


<div class="tag_box mt10">
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
<form name="myform" action="index.php?m=datacall&c=add" method="post" target="supportiframe" class="layui-form">
<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
<input type="hidden" value="{yun:}$smarty.get.type{/yun}" name="type">
<table width="100%" class="table_form" style="background:#fff;">
 <tr>
              <td colspan="2" bgcolor="#f0f6fb"><div class="admin_bold">添加数据调用</div></td>
            </tr>
        <tr class="admin_table_trbg" >
            <th>调用名称：</th>
            <td><input type="text"  value="{yun:}$info.name{/yun}" name="name" class="input-text"></td>
        </tr>
        <tr>
            <th>模板：</th>
            <td><textarea name="code" rows="10" cols="80">{yun:}if $info.code{/yun}{yun:}$info.code{/yun}{yun:}else{/yun}<ul>
    <!--循环开始-->
    <loop>
        <li><a href="{url}">{name}</a></li>
    </loop>
    <!--循环结束-->
</ul>{yun:}/if{/yun}</textarea> <a href="#sm">查看说明</a></td>
        </tr>
        <tr class="admin_table_trbg" >
            <th>排序方式：</th>
            <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name="byorder" lay-filter="" id="byorder_val">
                      <option value="">请选择</option>
                      {yun:}foreach item=row key=k from=$datacall.order{/yun}
                      <option value="{yun:}$k{/yun}" {yun:}if $info.byorder==$k{/yun}selected{yun:}/if{/yun}>{yun:}$row{/yun}</option>
                      {yun:}/foreach{/yun}
                    </select>
                 </div>
               </div>
            </div>
            </td>
        </tr>
        <tr>
            <th>标题长度：</th>
            <td><input type="text" value="{yun:}$info.titlelen{/yun}" name="titlelen" class="input-text">字符数</td>
        </tr>
        <tr class="admin_table_trbg" >
            <th>内容长度：</th>
            <td><input type="text" value="{yun:}$info.infolen{/yun}" name="infolen" class="input-text">字符数</td>
        </tr>
        <tr>
            <th>调取条数：</th>
            <td><input type="text" value="{yun:}$info.num{/yun}" name="num" class="input-text"></td>
        </tr>
        <tr class="admin_table_trbg" >
            <th>更新间隔时间：</th>
            <td><input type="text" value="{yun:}$info.edittime{/yun}" name="edittime" class="input-text">分</td>
        </tr>
        <tr>
            <th>链接打开方式：</th>
            <td> 
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name="urltype" lay-filter="" id="urltype_val">
                      <option value="1" {yun:}if $info.urltype=='1'{/yun}selected{yun:}/if{/yun}>新窗口</option>
                      <option value="2" {yun:}if $info.urltype=='2'{/yun}selected{yun:}/if{/yun}>原窗口</option>
                    </select>
                 </div>
                 <div class="layui-form-mid layui-word-aux">新窗口打开，请在a标签中添加{target}</div>
               </div>
            </div>
            </td>
        </tr>
         {yun:}foreach item=row key=k from=$datacall.where{/yun}
        <tr>
            <th>{yun:}$row.0{/yun}：</th>
            <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name="{yun:}$k{/yun}" lay-filter="" id="type_val">
                      <option value="">请选择</option>
                      {yun:}foreach item=ra key=key from=$row{/yun}
                      <option value="{yun:}$key{/yun}" {yun:}if $where.$k==$key{/yun}selected{yun:}/if{/yun}>{yun:}$ra{/yun}</option>
                      {yun:}/foreach{/yun}
                    </select>
                 </div>
               </div>
            </div>
            </td>
        </tr>
        {yun:}/foreach{/yun}
        <tr class="admin_table_trbg" >
            <th>时间格式：</th>
            <td>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name="timetype" lay-filter="" id="timetype_val">
                      <option value="Y-m-d" {yun:}if $info.timetype=='Y-m-d'{/yun}selected{yun:}/if{/yun}>2013-01-01</option>
                      <option value="m-d" {yun:}if $info.timetype=='m-d'{/yun}selected{yun:}/if{/yun}>08-08</option>
                      <option value="H:i" {yun:}if $info.timetype=='H:i'{/yun}selected{yun:}/if{/yun}>18:05</option>
                      <option value="Y-m-d H:i" {yun:}if $info.timetype=='Y-m-d H:i'{/yun}selected{yun:}/if{/yun}>2013-01-01 18:05</option>
                    </select>
                 </div>
               </div>
            </div>
            </td>
        </tr>
         <tr>
            <td align="center" colspan="2">
            {yun:}if $info.id{/yun}
            <input name="id" type="hidden" value="{yun:}$info.id{/yun}">
            <input class="layui-btn layui-btn-normal" type="submit" name="submit" value="&nbsp;修 改&nbsp;" />
            {yun:}else{/yun}
            <input class="layui-btn layui-btn-normal" type="submit" name="submit" value="&nbsp;添 加&nbsp;" />
            {yun:}/if{/yun}
            <input class="layui-btn layui-btn-normal" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" /></td>
        </tr>
</table>
</form>
</div>
<div class="tag_box mt10">
<table width="100%" class="table_form" style="background:#fff;">
       <tr>
              <td colspan="2" bgcolor="#f0f6fb"><div class="admin_bold">调用说明</div></td>
            </tr>
            {yun:}foreach item=row key=k from=$datacall.field{/yun}
	<tr > <th width="160" height="30">{yun:}$row{/yun}</th>   <td >代码：{{yun:}$k{/yun}}</td> </tr>
{yun:}/foreach{/yun}

 </table>           

</div>
<script> 
layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
});</script>

</body>
</html>